home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / naming / NamingException.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.3 KB  |  127 lines

  1. package javax.naming;
  2.  
  3. public class NamingException extends Exception {
  4.    protected Name resolvedName;
  5.    protected Object resolvedObj;
  6.    protected Name remainingName;
  7.    protected Throwable rootException = null;
  8.    private static final long serialVersionUID = -1299181962103167177L;
  9.  
  10.    public NamingException(String var1) {
  11.       super(var1);
  12.       this.resolvedName = this.remainingName = null;
  13.       this.resolvedObj = null;
  14.    }
  15.  
  16.    public NamingException() {
  17.       this.resolvedName = this.remainingName = null;
  18.       this.resolvedObj = null;
  19.    }
  20.  
  21.    public Name getResolvedName() {
  22.       return this.resolvedName;
  23.    }
  24.  
  25.    public Name getRemainingName() {
  26.       return this.remainingName;
  27.    }
  28.  
  29.    public Object getResolvedObj() {
  30.       return this.resolvedObj;
  31.    }
  32.  
  33.    public String getExplanation() {
  34.       return this.getMessage();
  35.    }
  36.  
  37.    public void setResolvedName(Name var1) {
  38.       if (var1 != null) {
  39.          this.resolvedName = (Name)var1.clone();
  40.       } else {
  41.          this.resolvedName = null;
  42.       }
  43.  
  44.    }
  45.  
  46.    public void setRemainingName(Name var1) {
  47.       if (var1 != null) {
  48.          this.remainingName = (Name)var1.clone();
  49.       } else {
  50.          this.remainingName = null;
  51.       }
  52.  
  53.    }
  54.  
  55.    public void setResolvedObj(Object var1) {
  56.       this.resolvedObj = var1;
  57.    }
  58.  
  59.    public void appendRemainingComponent(String var1) {
  60.       if (var1 != null) {
  61.          try {
  62.             if (this.remainingName == null) {
  63.                this.remainingName = new CompositeName();
  64.             }
  65.  
  66.             this.remainingName.add(var1);
  67.          } catch (NamingException var3) {
  68.             throw new IllegalArgumentException(var3.toString());
  69.          }
  70.       }
  71.  
  72.    }
  73.  
  74.    public void appendRemainingName(Name var1) {
  75.       if (var1 != null) {
  76.          if (this.remainingName != null) {
  77.             try {
  78.                this.remainingName.addAll(var1);
  79.             } catch (NamingException var3) {
  80.                throw new IllegalArgumentException(var3.toString());
  81.             }
  82.          } else {
  83.             this.remainingName = (Name)var1.clone();
  84.          }
  85.  
  86.       }
  87.    }
  88.  
  89.    public Throwable getRootCause() {
  90.       return this.rootException;
  91.    }
  92.  
  93.    public void setRootCause(Throwable var1) {
  94.       if (var1 != this) {
  95.          this.rootException = var1;
  96.       }
  97.  
  98.    }
  99.  
  100.    public Throwable getCause() {
  101.       return this.getRootCause();
  102.    }
  103.  
  104.    public Throwable initCause(Throwable var1) {
  105.       super.initCause(var1);
  106.       this.setRootCause(var1);
  107.       return this;
  108.    }
  109.  
  110.    public String toString() {
  111.       String var1 = super.toString();
  112.       if (this.rootException != null) {
  113.          var1 = var1 + " [Root exception is " + this.rootException + "]";
  114.       }
  115.  
  116.       if (this.remainingName != null) {
  117.          var1 = var1 + "; remaining name '" + this.remainingName + "'";
  118.       }
  119.  
  120.       return var1;
  121.    }
  122.  
  123.    public String toString(boolean var1) {
  124.       return var1 && this.resolvedObj != null ? this.toString() + "; resolved object " + this.resolvedObj : this.toString();
  125.    }
  126. }
  127.